{% extends "base.html" %}
{% block page_title %}Manage Password{% endblock %}

{% block content %}
<div class="row">
  <div class="col-md-6 col-md-offset-3">
    <div class="card">
      <div class="cardface">
        <h2>Update Password</h2>
        {% if form.non_field_errors %}
          <div class="bg-danger alert">
            {% for err in form.non_field_errors %}
              <p class="form-error">{{ err }}</p>
            {% endfor %}
          </div>
        {% endif %}
        <form role="form" method="post" action="{% url 'account_change_password' %}">
          {% csrf_token %}
          {% for field in form %}
            <div class="form-group">
              <label class="control-label" for="{{ field.id_for_label }}">{{ field.label }}</label>
              <input class="form-control" id="{{ field_for_label }}" maxlength="30" name="{{ field.html_name }}" type="password" placeholder="{{ field.label }}" />
              {{ field.errors }}
            </div>
          {% endfor %}
          <div class="form-group">
            <button class="btn btn-primary" type="submit">Update Password</button>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
{% endblock %}
